feat(current-user): expose customer info in sysdig_current_user data source#699
feat(current-user): expose customer info in sysdig_current_user data source#699
Conversation
airadier
commented
Feb 6, 2026
- Adds customer_id, customer_name, and customer_external_id computed attributes to sysdig_current_user
- Clarifies sysdig_secure_tenant_external_id docs to distinguish cloud onboarding external ID from customer-level external ID
…source Add customer_id, customer_name, and customer_external_id computed attributes to the sysdig_current_user data source, sourced from the user's customer object in the API response. Clarify documentation for sysdig_secure_tenant_external_id to distinguish the cloud onboarding external ID from the customer-level external ID. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Expose customer metadata on the sysdig_current_user data source and clarify the difference between tenant cloud-onboarding external IDs vs customer external IDs in documentation.
Changes:
- Add
customer_id,customer_name, andcustomer_external_idcomputed attributes tosysdig_current_user. - Extend the v2 client user model to deserialize
customerinformation. - Update docs to clarify
sysdig_secure_tenant_external_idmeaning and document newsysdig_current_userattributes.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| website/docs/d/secure_tenant_external_id.md | Clarifies the tenant external ID is for cloud onboarding and points users to sysdig_current_user for customer external ID. |
| website/docs/d/current_user.md | Documents new customer-related computed attributes for the current user data source. |
| sysdig/internal/client/v2/model.go | Adds Customer model and includes it in User for API deserialization. |
| sysdig/data_source_sysdig_current_user_test.go | Extends acceptance test to assert new attributes are present in state. |
| sysdig/data_source_sysdig_current_user.go | Adds schema + read mapping for customer attributes on the data source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
customer_name and customer_external_id may be empty depending on the account/environment, making TestCheckResourceAttrSet brittle. The customer_id check alone is sufficient to verify the customer object mapping works correctly. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
airadier
left a comment
There was a problem hiding this comment.
Addressing Copilot review comments.
…source (#699) - Adds customer_id, customer_name, and customer_external_id computed attributes to sysdig_current_user - Clarifies sysdig_secure_tenant_external_id docs to distinguish cloud onboarding external ID from customer-level external ID --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com> Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>